home *** CD-ROM | disk | FTP | other *** search
/ American History: Interactive Maps & User's Guide / American History: Interactive Maps & User's Guide.iso / pc / ImapTest.dxr / 00001_Rollover Handlers.ls next >
Encoding:
Text File  |  2000-01-25  |  2.5 KB  |  84 lines

  1. on startMovie
  2.   global gChapter
  3.   set the volume of sound 1 to 255
  4.   set the volume of sound 2 to 255
  5.   hSetUpInterface()
  6.   set the visible of sprite 12 to 0
  7.   set the visible of sprite 46 to 0
  8.   set the visible of sprite 47 to 0
  9. end
  10.  
  11. on hSetUpInterface
  12.   global gChapter, gSplit
  13.   puppetSprite(37, 1)
  14.   puppetSprite(38, 1)
  15.   if gSplit = 2 then
  16.     if (gChapter = 31) or (gChapter = 32) then
  17.       set the castNum of sprite 38 to member ("chapterDisplay" & gChapter)
  18.     else
  19.       set the castNum of sprite 38 to member ("chapterDisplay" & gChapter - 12)
  20.     end if
  21.   else
  22.     set the castNum of sprite 38 to member ("chapterDisplay" & gChapter)
  23.   end if
  24.   case gChapter of
  25.     1, 2, 3, 4:
  26.       set the castNum of sprite 37 to member "corner1"
  27.     5, 6, 7:
  28.       set the castNum of sprite 37 to member "corner2"
  29.     8, 9, 10:
  30.       set the castNum of sprite 37 to member "corner3"
  31.     11, 12:
  32.       set the castNum of sprite 37 to member "corner4"
  33.     13, 14, 15:
  34.       set the castNum of sprite 37 to member "corner5"
  35.     16, 17:
  36.       set the castNum of sprite 37 to member "corner6"
  37.     18, 19, 20:
  38.       set the castNum of sprite 37 to member "corner7"
  39.     21, 22, 23:
  40.       set the castNum of sprite 37 to member "corner8"
  41.     24, 25, 26:
  42.       set the castNum of sprite 37 to member "corner9"
  43.     27, 28, 29, 30:
  44.       set the castNum of sprite 37 to member "corner10"
  45.   end case
  46.   updateStage()
  47. end
  48.  
  49. on RollOverStatesTwoChoices TheirAnswer1, TheirAnswer2, CurrentQuestionType
  50.   global IMapTest
  51.   set firstRolloverSprite to getFirstChoiceSpriteNumber(IMapTest) + 1
  52.   set secondRolloverSprite to CurrentQuestionType + firstRolloverSprite - 1
  53.   repeat with counter = firstRolloverSprite to secondRolloverSprite
  54.     set currentAnswerCheck to counter - (firstRolloverSprite - 1)
  55.     if (currentAnswerCheck = TheirAnswer1) or (currentAnswerCheck = TheirAnswer2) then
  56.       nothing()
  57.       next repeat
  58.     end if
  59.     if rollOver(counter) then
  60.       swapCast(counter, "yellow button")
  61.       next repeat
  62.     end if
  63.     swapCast(counter, "normal button")
  64.   end repeat
  65. end
  66.  
  67. on RollOverStates CurrentQuestionType
  68.   global IMapTest
  69.   set firstRolloverSprite to getFirstChoiceSpriteNumber(IMapTest) + 1
  70.   set secondRolloverSprite to CurrentQuestionType + firstRolloverSprite - 1
  71.   repeat with counter = firstRolloverSprite to secondRolloverSprite
  72.     if rollOver(counter) then
  73.       swapCast(counter, "yellow button")
  74.       next repeat
  75.     end if
  76.     swapCast(counter, "normal button")
  77.   end repeat
  78. end
  79.  
  80. on SAveBookmark
  81.   global gBookMark
  82.   set gBookMark to "Test"
  83. end
  84.